        ORG 0000H
        LJMP MAIN
        ORG 000BH
        LJMP T0_INT_S
        ORG 0100H
MAIN:
        MOV SP,#60H
        MOV R0,#0
        SETB P1.1
        MOV TMOD,#01H
        MOV TH0,#0D8H
        MOV TL0,#0F0H
        SETB TR0
        SETB ET0
        SETB EA
LOOP:   JMP LOOP

T0_INT_S:
        MOV TH0,#0D8H
        MOV TL0,#0F0H
        INC R0
        CJNE R0,#5,NEXT0
        SETB P1.1
        MOV R0,#0
NEXT0:
        CJNE R0,#2,NEXT1
        CLR P1.1
NEXT1:
        RETI


        END
